package com.chinasoft.maysham.manager.repo.config;

import com.chinasoft.maysham.manager.model.ProjectConfig;
import com.chinasoft.maysham.manager.repo.BaseRepo;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Repository;

@Repository
public class ProjectConfigRepo extends BaseRepo {

    public ProjectConfig findByProjectId(String projectId){
        return template.findOne(Query.query(Criteria.where("deleted").is(false).and("projectId").is(projectId)), ProjectConfig.class);
    }
}
